/*=====================================================
Critical Links
Auto Configuration Server

Authors:
	Rui Eduardo Gouveia Gil - r-gil@critical-links.com

Date: 2010
Version 0.1
=======================================================*/
#ifndef __SACCOUNT_H__
#define __SACCOUNT_H__

#include <string>
#include <vector>
#include <sstream>
#include <iostream>
#include <boost/filesystem.hpp>
#include <boost/algorithm/string.hpp>
#include <rgcpp/tools/StringTokenizer.h>

namespace acs
{

#define MENU_INDEX 1
#define MENU_DEVICES 2
#define MENU_GROUPS 3
#define MENU_CONFIGURATIONS 4
#define MENU_USERS 5

#define SC_ACTION_NEW "new"
#define SC_ACTION_SHOW "show"
#define SC_ACTION_EDIT "edit"

class SAccount
{
	public:
		static std::vector<std::string> getMenuHtml(std::string divID, int menuIndex);

		static std::vector<std::string> getHtml(std::string divID, std::string query);
		static std::vector<std::string> createUser(std::string name, int type, std::string login, std::string pass1, std::string pass2);
		static std::vector<std::string> saveUser(int userID, std::string name, int type, std::string login, std::string pass1, std::string pass2);
		static std::vector<std::string> removeUser(int userID);

	private:
		static std::vector<std::string> getUserListHtml(std::string divID);
		static std::vector<std::string> getNewUserHtml(std::string divID);
		static std::vector<std::string> getEditUserHtml(std::string divID, int userID);
		static std::vector<std::string> getUserHtml(std::string divID, int userID);
};

}

#endif
